
function drag(obj){
    var y=0;
    //console.log(obj)
    obj.addEventListener('touchstart', function(ev){
        var disY=ev.targetTouches[0].pageY-y;

        function fnMove(ev){
            y=ev.targetTouches[0].pageY-disY;
            if(y>0){
                y=0;
            }
            obj.style.WebkitTransform='translateY('+y+'px)';
            ev.preventDefault();

        }
        function fnEnd(){
            document.removeEventListener('touchmove', fnMove, false);
            document.removeEventListener('touchend', fnEnd, false);
        }
        document.addEventListener('touchmove', fnMove, false);
        document.addEventListener('touchend', fnEnd, false);
        return false;
    }, false);
}
